# swap algorithms, keep the workflow
clf = LogisticRegression() # or
clf = DecisionTreeClassifier() # or
clf = RandomForestClassifier() # or
clf = GradientBoostingClassifier()
# same workflow regardless
clf.fit(X_train, y_train)
predictions = clf.predict(X_test)
accuracy = accuracy_score(y_test, predictions)